package com.wu.llpsw.HUD;


import net.minecraft.client.Minecraft;
import net.minecraft.world.entity.player.Player;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.client.event.*;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;

@Mod.EventBusSubscriber(value = Dist.CLIENT,modid = "wu")
public class HudClientEvent {
    @SubscribeEvent
    public static void onOverlayRender(RenderGameOverlayEvent event) {
        if(!RenderGameOverlayEvent.ElementType.ALL.equals(event.getType())){
            return;
        }

        Player player=Minecraft.getInstance().player;
        if(player==null){return;}
        energyHUD energyhud = new energyHUD(event.getMatrixStack());
        energyhud.allBgRender();
        energyhud.energyRender();
        energyhud.levelWordRender(player);
    }


}
